package com.alex.core.contants.enums.order;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 订单是否允许取消充电枚举
 */
@AllArgsConstructor
@Getter
public enum OrderIsOrderCancelEnum {
    // 1-是,0-否
    IS(1, "允许取消充电"),
    NOT(0, "不允许取消充电"),
    ;
    private final Integer code;
    private final String value;

    public static OrderIsOrderCancelEnum getByCode(Integer code) {
        for (OrderIsOrderCancelEnum value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}